package com.fsc.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fsc.entity.domain.ExamsInfo;
import com.fsc.mapper.ExamsInfoMapper;
import com.fsc.service.ExamsInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class ExamsInfoServiceImpl extends ServiceImpl<ExamsInfoMapper, ExamsInfo>
		implements ExamsInfoService{

	@Autowired
	private ExamsInfoMapper examsInfoMapper;
	@Override
	public List<ExamsInfo> getAllExams() {
		return examsInfoMapper.selectList(null);
	}

	@Override
	public Integer addExams(ExamsInfo examsInfo) {
		examsInfoMapper.insert(examsInfo);
		Integer id = examsInfo.getId();
		return id;
	}
}
